package com.create404.suishoupai.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author create404
 * @since 2021-07-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Employee对象")
@AllArgsConstructor
@NoArgsConstructor
public class Employee implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "员工id")
    private String employeeId;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "头像")
    private String avatar;

    @ApiModelProperty(value = "手机")
    private String phone;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "性别")
    private String gender;

    @ApiModelProperty(value = "年龄")
    private LocalDateTime birth;

    @ApiModelProperty(value = "部门id")
    private String departmentId;

    @ApiModelProperty(value = "职位")
    private String position;

    @ApiModelProperty(value = "上级id")
    private String superiorEmployeeId;

    @ApiModelProperty(value = "入职时间")
    private LocalDateTime onboardingTime;

    @ApiModelProperty(value = "离职时间")
    private LocalDateTime separationTime;

    @ApiModelProperty(value = "随机盐")
    private String salt;

    //定义角色集合
    @TableField(exist = false)
    private List<Role> roles;


}
